package org.chen.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.chen.domain.entity.SystemConfig;

@Mapper
public interface SystemConfigMapper extends BaseMapper<SystemConfig> {
    @Select("SELECT * FROM sys_config LIMIT 1")
    SystemConfig getConfig();
    
    @Update("UPDATE sys_config SET system_name = #{systemName} WHERE id = #{id}")
    int updateSystemName(@Param("id") Long id, @Param("systemName") String systemName);
}